home
***
CD-ROM
|
disk
|
FTP
|
other
***
search
/
Cream of the Crop 22
/
Cream of the Crop 22.iso
/
doom
/
server_1.zip
/
_MOTD.QC
< prev
next >
Wrap
Text File
|
1996-10-04
|
4KB
|
134 lines
/*
**
** _motd.qc (Motd Code, 1.1)
**
** Copyright (C) 1996 Johannes Plass
**
** This program is free software; you can redistribute it and/or modify
** it under the terms of the GNU General Public License as published by
** the Free Software Foundation; either version 2 of the License, or
** (at your option) any later version.
**
** This program is distributed in the hope that it will be useful,
** but WITHOUT ANY WARRANTY; without even the implied warranty of
** MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
** GNU General Public License for more details.
**
** You should have received a copy of the GNU General Public License
** along with this program; if not, write to the Free Software
** Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA.
**
** Author: Johannes Plass (plass@dipmza.physik.uni-mainz.de)
**
*/
//==============================================================
// Defaults
//==============================================================
// To modify the MOTD or the duration it is displayed when
// a player connects please consult in the function 'MotdInit'
// below.
//==============================================================
// MotdInfo
//==============================================================
void(entity player) MotdInfo =
{
// nothing to do
};
//==============================================================
// MotdActiveMessage
//==============================================================
void(entity player) MotdActiveMessage =
{
if (!USE_MODULE_MOTD) return;
// 123456789#123456789#123456789#12345678
sprint(player," Motd\n");
};
//==============================================================
// MotdInit
//==============================================================
void(entity player) MotdInit =
{
if (!USE_MODULE_MOTD) {
PlayerStatusSetFlag(player,PLAYER_PASSED_MOTD);
return;
}
/*
** 'motd_motd' is the message shown when a player first connsects
** to the server. Note that it *must* not be longer than
** 255 chars !
** 'motd_duration' is the time the motd stays center-printed
** on the player's screen (in units of seconds).
** By default *no* message is shown.
*/
motd_motd = "╙σ≥÷σ≥═∩Σ⌡∞σ≤ ▓«╡«╢\n\n¡¡\n\ntype 'help-server' for help\n\n¡¡\n\npress jump to join the game";
motd_duration = 5.0; // time the motd stays center-printed (in units of seconds)
/*
=== A scratch-board: =====================
123456789#123456789#123456789#12345678
motd_motd = "
╙σ≥÷σ≥═∩Σ⌡∞σ≤ ▓«╡«╢\n\n¡¡\n\n
type 'help-server' for help\n\n¡¡\n\n
press jump to join the game";
ServerModules 1 2 3 4 5 6 7 8 9 0 . -
╙σ≥÷σ≥═∩Σ⌡∞σ≤ ▒ ▓ │ ┤ ╡ ╢ ╖ ╕ ╣ ░ « ¡
==========================================
*/
player.motd_start_time = time;
player.motd_centerprint_time = time - 2;
player.motd_status = player.motd_status | MOTD_MOTD;
};
//==============================================================
// MotdThink
//==============================================================
void() MotdThink =
{
if (self.button2) {
centerprint(self,"");
self.motd_status = 0;
PlayerStatusSetFlag(self,PLAYER_PASSED_MOTD);
}
if (self.player_status & PLAYER_PASSED_MOTD) return;
if (self.motd_status & MOTD_MOTD) {
if (time < self.motd_start_time + motd_duration) {
if (time > self.motd_centerprint_time + 1.8) {
centerprint(self,motd_motd);
self.motd_centerprint_time = time;
}
} else {
centerprint(self,"");
self.motd_status = self.motd_status - MOTD_MOTD;
self.motd_status = self.motd_status | MOTD_CONSOLE;
}
return;
}
if (self.motd_status & MOTD_CONSOLE) {
ServerHelpShowHelp(self);//#jp#(ServerHelp)
ServerHelpAnnounce(self);//#jp#(ServerHelp)
self.motd_status = self.motd_status - MOTD_CONSOLE;
PlayerStatusSetFlag(self,PLAYER_PASSED_MOTD);
return;
}
};